#include <Unit.h>
#include <string>

Unit::Unit (int ratio, const string name) :
   m_ratio (ratio)
{
   m_name = name;
}

int Unit::toBaseUnit (const int amount) const 
{
   return m_ratio * amount;
}

ostream& operator << (ostream& out, const Unit& unit)
{
   out << unit.m_name;
}
